﻿<%@ Page Language="C#" MasterPageFile="~/Shared/FormPage.Master" AutoEventWireup="true" CodeBehind="MaintainBasicApprove.aspx.cs" Inherits="Runda.CMS.Portal.ContractFollowUp.MaintainBasicApprove" StylesheetTheme="GlobleTheme"%>
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Content/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../Content/global.js" type="text/javascript"></script>

    <script src="../Content/Grid/map_grid.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" href="../Content/Grid/mapgrid.css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" />
    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Tab/tabs.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../Content/global.css" />

    <script language="javascript" src="../Content/settings.aspx"></script>

    <script src="../Content/lookup/Lookup.js" type="text/javascript"></script>

    <link href="../Content/Form/form.css" rel="Stylesheet" type="text/css" />

    <script language="javascript" src="../Content/Detail.js"></script>
     

    <script language="javascript" src="../Content/Menu/menu.js"></script>

    <script language="javascript" src="../Content/util.js"></script>

    <script type="text/javascript" src="../Content/DateTime/date.js"></script>

    <script type="text/javascript" src="../Content/DateTime/time.js"></script>

    <script src="../Content/global.js" type="text/javascript"></script>

    <script type="text/javascript">
        function LoadExtension() {
            if (document.getElementById('<%=hiddenMaintainID.ClientID %>').value == '') {
                alert('请先保存基本信息!'); return false;
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '1') {
                loadArea("__appNavBar_areaAddress1", "InstrumentAssemblyExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value + "&Type" + document.getElementById('<%=hidPageType.ClientID %>').value, "");
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '2' || document.getElementById('<%=hiddenWorkType.ClientID %>').value == '9') {
                loadArea("__appNavBar_areaAddress1", "InstrumentMaintainExtra.aspx?RegisterID=" + document.getElementById('<%=hiddenRegisterID.ClientID %>').value + "&MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '3') {
                loadArea("__appNavBar_areaAddress1", "InstrumentConservationExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '5') {
                loadArea("__appNavBar_areaAddress1", "InstrumentUpgradeMaintainExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '6') {
                loadArea("__appNavBar_areaAddress1", "InstrumentAjustExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '7') {
                loadArea("__appNavBar_areaAddress1", "InstrumentReturnVisitExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
            }
            if (document.getElementById('<%=hiddenWorkType.ClientID %>').value == '8') {
                loadArea("__appNavBar_areaAddress1", "InstrumentCommissionExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
            }
            return false;
        }
        function LoadReadRecordExtension() {
            if (document.getElementById('<%=hiddenMaintainID.ClientID %>').value == '') {
                alert('请先保存基本信息!'); return false;
            }
            loadArea("__appNavBar_areaAddress2", "InstrumentReadRecordExtra.aspx?MaintainID=" + document.getElementById('<%=hiddenMaintainID.ClientID %>').value, "");
        }

      
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphFormArea" runat="server">

    <table class="layout" cellspacing="0" cellpadding="0">
        <colgroup>
            <col width="140">
            <!-- 导航菜单：140px -->
            <col />
        </colgroup>
        <tbody>
            <tr>
                <td class="leftBar">
                    <span class="leftBar" id="appNavBar" defaultarea="__appNavBar_navInfo">
                        <div class="lbItem" tabindex="0" title="主要信息" id="__appNavBar_navInfo" onclick='loadArea("areaForm", "","")'>
                            <img src="/Images/info_16_wihte.gif" align="absmiddle">&nbsp; 主要信息</div>
                        <div class="lbItem" tabindex="1" title="工作详情" onclick='return LoadExtension();' id="workDetail">
                             </div>
                        <div class="lbItem" tabindex="1" title="读数详情" onclick='return LoadReadRecordExtension();'>
                            <img src="/Images/Menu/Customer_30_white.gif" align="absmiddle">&nbsp; 读数详情</div>
                    </span>

                    <script language="javascript">                        function _createIframe() { }</script>

                </td>
                <td id="tdAreas">
                    <div class="area" id="areaForm">
                        <table class="mnubar" cellspacing="0" cellpadding="0">
                            <tbody>
                                <tr>
                                    <td width="9">
                                        <img hspace="3" src="../Content/Menu/mnu_vSpacer.gif">
                                    </td>
                                    <td class="icMenu" nowrap>                                                                          
                                        <img src="../Content/Menu/separator.gif">
                                        <asp:LinkButton ID="lnkbtnSaveAndCloseTenal" runat="server" OnClick="lnkbtnSaveAndCloseTenal_Click"
                                            OnClientClick=""><span class="menu" title="暂存" onclick="window.execScript(this.action);"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif"><span class="mnuBtn">暂存</span></span></asp:LinkButton>
                                          <img src="../Content/Menu/separator.gif">
                                              <asp:LinkButton ID="lnkbtnSaveAndClose" runat="server" OnClick="lnkbtnSaveAndClose_Click"
                                            OnClientClick=""><span class="menu" title="完成" onclick="window.execScript(this.action);window.close();"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif"><span class="mnuBtn">完成&amp;关闭</span></span></asp:LinkButton>
                                             <img src="../Content/Menu/separator.gif">
                                        <span class="menu" title="关闭" onclick="window.close();">
                                            <img class="mnuBtn" src="../Content/Menu/Close_16_blue.gif"><span class="mnuBtn">关闭</span></span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
                        </div>
                        <div id="areaForm2" class="area">
                            <asp:HiddenField runat="server" ID="hiddenRegisterID" />
                            <asp:HiddenField runat="server" ID="hiddenMaintainID" />
                            <asp:HiddenField runat="server" ID="hiddenWorkType" />
                            <asp:HiddenField runat="server" ID="hidPageType" />
                            <table cellspacing="0" cellpadding="0" width="100%" height="190px">
                                <tbody>
                                    <tr>
                                        <td valign="top">
                                            <div style="display: inline" id="appForm_tab0" class="tab">
                                                <table style="table-layout: fixed" id="Section1" cellspacing="0" cellpadding="3"
                                                    width="100%">
                                                    <colgroup>
                                                        <col width="110">
                                                        <col>
                                                        <col width="110">
                                                        <col>
                                                    </colgroup>
                                                    <tbody>
                                                        <tr>
                                                            <td>
                                                                单据号
                                                            </td>
                                                            <td>
                                                                <asp:Label runat="server" ID="maintainBillNum"></asp:Label>
                                                            </td>
                                                            <td>
                                                                客户
                                                            </td>
                                                            <td class="req">
                                                                <asp:Label runat="server" ID="customerName"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                仪器型号
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="InstrumentName" runat="server"></asp:Label>
                                                                <asp:TextBox ID="InstrumentID" runat="server" style="display:none"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                仪器所属厂家
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="InstrumentBelongTo" runat="server"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                仪器序列号
                                                            </td>
                                                            <td class="req">
                                                                <asp:Label ID="InstrumentSerialNum" runat="server"></asp:Label>
                                                            </td>
                                                            <td>
                                                                服务等级
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ServiceLevel" runat="server" Enabled="false">
                                                                    <asp:ListItem Text="普通" Value="Normal"></asp:ListItem>
                                                                    <asp:ListItem Text="VIP" Value="VIP"></asp:ListItem>
                                                                    <asp:ListItem Text="VVIP" Value="VVIP"></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="req">
                                                                保修情况
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList runat="server" ID="GuaranteeInfo">
                                                                </asp:DropDownList>
                                                            </td>
                                                            <td class="req">
                                                                现场技术人员
                                                            </td>
                                                            <td>
                                                                <table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
                                                                    <tr>
                                                                        <td nowrap>
                                                                            <div class="lu">
                                                                                <span class="lui" oid="" onclick="openlui();"></span>
                                                                                <asp:Label ID="employeeName" runat="server"></asp:Label></div>
                                                                        </td>
                                                                        <td width="25" style="text-align: right;">
                                                                            <img class="lu2" lookupbrowse="" lookupstyle="single" lookupclass="" features="dialogWidth:360px;dialogHeight:500px;resizable:yes;center:yes;status:no;help:no;scroll:no;"
                                                                                lookupcustom="/Lookup/selectcustomeroflookup.aspx?title=user&department=maintain" src="/Images/btn_off_lookup.gif"><input
                                                                                    maptype="lu" class="lu" type="hidden" name="employeeGUID" value="" runat="server"
                                                                                    id="employeeGUID">
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>                                                        
                                                            <td class="req">
                                                                获悉日期时间
                                                            </td>
                                                            <td>
                                                                <rad:RadDateTimePicker ID="ReceiveDate" runat="server" Culture="Chinese (People's Republic of China)"
                                                                    Skin="WebBlue" Width="160px">
                                                                    <DateInput Skin="WebBlue">
                                                                    </DateInput>
                                                                    <Calendar Skin="WebBlue">
                                                                    </Calendar>
                                                                </rad:RadDateTimePicker>
                                                            </td>
                                                            <td class="req">
                                                                开始日期时间
                                                            </td>
                                                            <td>
                                                                <rad:RadDateTimePicker ID="BeginDate" runat="server" Culture="Chinese (People's Republic of China)"
                                                                    Skin="WebBlue" Width="160px">
                                                                    <DateInput Skin="WebBlue">
                                                                    </DateInput>
                                                                    <Calendar Skin="WebBlue">
                                                                    </Calendar>
                                                                </rad:RadDateTimePicker>
                                                            </td>
                                                        </tr>                                                   
                                                        <tr>
                                                            <td class="req">
                                                                路途时间
                                                            </td>
                                                            <td>
                                                                <rad:RadNumericTextBox ID="OnWayTime" runat="server">
                                                                </rad:RadNumericTextBox>
                                                            </td>
                                                            <td class="req">
                                                                结束时间
                                                            </td>
                                                            <td>
                                                                <rad:RadDateTimePicker ID="txtEndTime" Width="160px" runat="server" Skin="WebBlue">
                                                                    <DateInput Skin="">
                                                                    </DateInput>
                                                                </rad:RadDateTimePicker>
                                                            </td>
                                                        </tr>     
                                                         <tr>
                                                            <td class="req">
                                                                服务目的
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="ServicePurpose" runat="server" TextMode="MultiLine"  Height="40px"></asp:TextBox>
                                                            </td>
                                                            <td class="req">
                                                                工作内容
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtWorkContent" runat="server" TextMode="MultiLine" Height="40px"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="req">
                                                                建议用户内容
                                                            </td>
                                                            <td colspan="3">
                                                                <asp:TextBox ID="RecommendContent" runat="server" TextMode="MultiLine"  Height="35px"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="req">
                                                                用户联系人
                                                            </td>
                                                            <td>                                                               
                                                                <asp:DropDownList ID="UsersContacter" runat="server"></asp:DropDownList>
                                                                <asp:LinkButton ID="linkContactor" runat="server" Text="添加用户联系人" 
                                                                    onclick="linkContactor_Click"></asp:LinkButton>
                                                            </td>
                                                             <td class="req">
                                                                服务后仪器状态
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtServicedStatus" runat="server"></asp:TextBox>
                                                            </td>
                                                        </tr>                                                      
                                                    </tbody>
                                                </table>
                                                <asp:Panel ID="Panel1" runat="server">
                                                    <table style="table-layout: fixed" id="Table2" cellspacing="0" cellpadding="3" width="100%">
                                                        <colgroup>
                                                            <col width="110">
                                                            <col>
                                                            <col width="110">
                                                            <col>
                                                        </colgroup>
                                                        <tbody>
                                                            <tr>
                                                                <td class="req">
                                                                    故障代码
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtFaultCode" runat="server"></asp:TextBox>
                                                                </td>
                                                                <td class="req">
                                                                    故障组件
                                                                </td>
                                                                <td> 
                                                                    <asp:DropDownList ID="ddlFaultComponents" runat="server">
                                                                    </asp:DropDownList>                                                                 
                                                                    
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </asp:Panel>
                                                <script type="text/javascript">
                                                    function onIsLinkBillChanged() {                                                     
                                                        var linkBill = document.getElementById('<%=IsLinkBill.ClientID %>').checked;
                                                        if (linkBill == true) {                                                            
                                                            document.getElementById('td1').style.display = "block";
                                                            document.getElementById('td2').style.display = "block";
                                                            document.getElementById('tr1').style.display = "none";
                                                            document.getElementById('tr2').style.display = "none";
                                                           
                                                                                                                   
                                                        } else {
                                                        document.getElementById('td1').style.display = "none";
                                                        document.getElementById('td2').style.display = "none";
                                                        document.getElementById('tr1').style.display = "block";
                                                        document.getElementById('tr2').style.display = "block";
                                                                                                                                       
                                                        }
                                                    }
                                                    window.onload = function() {
                                                        onIsLinkBillChanged();
                                                    }
                                                </script>
                                                <table style="table-layout: fixed" id="Table1" cellspacing="0" cellpadding="3" width="100%">
                                                    <colgroup>
                                                        <col width="110">
                                                        <col>
                                                        <col width="110">
                                                        <col>
                                                    </colgroup>
                                                    <tbody>
                                                        <tr><td colspan="4"> 同一时间同一客户多样工作时，以下内容只需录入一次,并打“√”和输入关联单据号</tr>
                                                        <tr>
                                                          <td colspan="2">
                                                               <asp:checkBox ID="IsLinkBill" runat="server" Text="与其他单据关联" TextAlign="Right" onclick="onIsLinkBillChanged();" Visible ="true" />
                                                            </td>
                                                             <td id = "td1" class="req" style="display:none">
                                                                电子服务单据号
                                                            </td>
                                                            <td id = "td2" class="req" style="display:none">
                                                                <asp:TextBox ID="txtPaperInvoicesNo" runat="server"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr id="tr1">
                                                            <td class="req">
                                                                到达用户车费
                                                            </td>
                                                            <td>
                                                                <rad:RadNumericTextBox ID="txtReachFare" runat="server">
                                                                    <NumberFormat AllowRounding="True" />
                                                                </rad:RadNumericTextBox>
                                                            </td>
                                                            <td class="req">
                                                                离开用户车费
                                                            </td>
                                                            <td>
                                                                <rad:RadNumericTextBox ID="txtLeaveFare" runat="server">
                                                                    <NumberFormat AllowRounding="True" />
                                                                </rad:RadNumericTextBox>
                                                            </td>
                                                        </tr>
                                                        <tr id="tr2">
                                                            <td class="req">
                                                                住宿费用
                                                            </td>
                                                            <td>
                                                                <rad:RadNumericTextBox ID="txtAccommodationFee" runat="server">
                                                                    <NumberFormat AllowRounding="True" />
                                                                </rad:RadNumericTextBox>
                                                            </td>
                                                        </tr>                                                                                                                                                                                                                       
                                                    </tbody>
                                                </table>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="statusBar" colspan="2">
                </td>
            </tr>
        </tbody>
    </table>
    <script type="text/javascript">
    
      function changeExta() { 
            var workType = document.getElementById('<%=hiddenWorkType.ClientID %>').value;
            var workDetail = document.getElementById('workDetail');
            if (workType == '2' || workType == '9') {
                workDetail.innerHTML = "<img src='/Images/Menu/Customer_30_white.gif' align='absmiddle'>&nbsp; 配件及易耗件列表";
            } else if (workType == '1') {
                workDetail.innerHTML = "<img src='/Images/Menu/Customer_30_white.gif' align='absmiddle'>&nbsp; 装机详情";
            } else { workDetail.innerHTML = "<img src='/Images/Menu/Customer_30_white.gif' align='absmiddle'>&nbsp; 服务详情"; }
        }
        changeExta();
</script> 
</asp:Content>
